package com.zzyl.member.controller;

import com.zzyl.common.core.controller.BaseController;
import com.zzyl.common.core.domain.AjaxResult;
import com.zzyl.common.core.page.TableDataInfo;
import com.zzyl.member.service.IMemberOrderProjectService;
import com.zzyl.serve.domain.NursingProject;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@Slf4j
@RequestMapping("/member/orders/project")
@RestController
public class MemberOrderProjectController extends BaseController {

    @Autowired
    private IMemberOrderProjectService memberOrderProjectService;

    @GetMapping("/page")
    public TableDataInfo<NursingProject> pageListProject(String name,Integer status){
        startPage();
        return memberOrderProjectService.pageList(name,status);
    }

    @GetMapping("/{id}")
    public AjaxResult getById(@PathVariable Integer id){
        return success(memberOrderProjectService.getByID(id));
    }
}
